package com.zlx.store.coupon.constants;

public interface CouponConstant {

    //被预热的优惠券总库存:hash
    public final static String PREPARING_COUPON_STOCK = "PCStock";

    //被预热的优惠券当前数量:hash
    public final static String PREPARING_COUPON_COUNT = "PCCount";

    //被预热的优惠券数量的锁
    public final static String PREPARING_COUPON_COUNT_LOCK = "PCCLock";

    //记录用户临时抢到的优惠券,这些优惠券暂时不更新到数据库中:hash
    public final static String TEMP_COUPON_COUNT = "TempC";

    //临时抢到的券的锁
    public final static String TEMP_COUPON_COUNT_LOCK = "TempCLock";

    //抢票防重队列:set
    public final static String AVOID_DUPLICATION_QUEUE = "ADQueue";

    //自动预热队列
    public final static String AUTO_PREPARE_QUEUE = "APQueue";

    //新人券的优惠券id
    public final static Long forNewComerCouponId = 1L;

    //布隆过滤器的lua脚本
    public final static String luaS = "return redis.call('BF.EXISTS',KEYS[1],ARGV[1])";

    //布隆过滤器
    public final static String couponBF = "couponBFilter";

    //配置redis本地支持布隆过滤器,配置lua脚本
    String luaScript = "return redis.call('BF.ADD',KEYS[1],ARGV[1])";
}
